import Vue from "vue";
import App from "./App.vue";
import "./registerServiceWorker";
import router from "./router";
import store from "./store";
//导入lib-flexible模块，该模块内置有媒体查询，可以设置在不同移动端屏幕下，根标签文字尺寸的动态计算
import "lib-flexible";
//字体图标
import "./assets/font/iconfont.css";
//公共样式
import "./assets/css/common.css";
import "./assets/js/vant_component.js";
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import "./assets/js/el_component.js";

//导入axios网络请求模块和vue-axios模块
import axios from "axios";
import VueAxios from "vue-axios";
//获取可用区域的屏幕大小
import { clientHeight } from "./assets/js/common.js";
//导入轮播图
import vueAwesomeSwiper from "vue-awesome-swiper"
import "swiper/dist/css/swiper.css"

//导入vuecookie
// import VueCookies from 'vue-cookies'
//注册轮播图插件
Vue.use(ElementUI);
Vue.use(vueAwesomeSwiper);
Vue.prototype.$height = clientHeight;
Vue.prototype.$ajax=axios;
Vue.config.productionTip = false;

//改成下面的了
// 城市信息--api
Vue.prototype.$url = "/api";
// Vue.prototype.$appKey = "4f22b453f5779a75"
//对axios进行全局注册，注意axios全局注册必须发生在根Vue实例被创建之前，并且创建成功之后，axios会作为所有vue实例的属性进行调用
Vue.use(VueAxios, axios);
//注册
// Vue.use(VueCookies);
new Vue({
  router,
  store,
  // 经纬度的全局变量
  data: function () {
    return {
      location,
    }
  },
  render: h => h(App)
}).$mount("#app");
